<%include pub/head.html%>
</head>
  <body class="bodybg">
    <div class="xu-index-head bg2" style="overflow: visible">
    	<div class="head-bg4"></div>
    	<div class="container">
	    	<%include pub/nav.html%>
	    </div>
	</div>
	<div class="xu-mian-panel">
        <div class="container">
        	<div class="row">
        		<div class="mw-all-bar">
        			<div class="myjob-title border">
                        <h3>站内通知</h3>
                        <%if(notices.message.length > 0){%>
                        <span class="delete-all-notice" data-toggle="modal" data-target="#deleteAll"><i class="icon iconfont icon-delete_light"></i>清空所有</span>
                        <%}%>
                    </div>
                    <%if(notices.message.length > 0){%>
                    	<%for(let i = 0; i < notices.message.length;i++){ let messages = notices.message %>
                    	<div class="user-notice-list" id="<%- messages[i]._id%>">
                    		<div class="notice-top"><span class="title"><%= messages[i].title %></span> <span class="msg-time"><%= messages[i].createAt %></span><span class="delete-one-notice" nid="<%- messages[i]._id%>"><i class="icon iconfont icon-delete_light"></i> 删除</span></div>
                    		<div class="notice-content"><%= messages[i].content %></div>
                    	</div>
                    	<%}%>
                        <div class="no-notice" style="display: none;">暂无消息</div>
                    <%}else{%>
                    <div class="no-notice">暂无消息</div>
                    <%}%>
        		</div>
        	</div>
        </div>
    </div>
    <%include pub/foot.html%>
    <div class="modal slide modal-small" id="deleteAll" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">提醒</h4>
              </div>
              <div class="modal-body delete-modal-body">
                确认要清空所有消息么？
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-danger" id="delete-all-btn">确认清空</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
              </div>
            </div>
        </div>
    </div>
    <div class="modal slide modal-small" id="deleteOne" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">提醒</h4>
              </div>
              <div class="modal-body delete-modal-body">
                <input type="hidden" id="onenoticeid">
                确认要删除此条消息么？
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-danger" id="delete-one-btn">删除</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
              </div>
            </div>
        </div>
    </div>
    <%include pub/script.html%>
  </body>
</html>